<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <script type='text/javascript' src='{{ STATIC_URL }}js/jquery-1.7.2.js'></script>
    <script type="text/javascript" src="{{ STATIC_URL }}js/jquery-ui-1.8.21.custom.min.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}js/tiny_mce/tiny_mce.js"></script>
    <link href="{{ STATIC_URL }}css/bootstrap.css" rel="stylesheet">
    <link type="text/css" href="{{ STATIC_URL }}css/jquery-ui-1.8.21.custom.css" rel="stylesheet"/>
    {% block extrahead %}{% endblock %}
    <style type="text/css">
        .grey {
            color: #808080;
        }
    </style>
    <script type="text/javascript">
        $(function () {
            $('.datepicker').datepicker({
                dateFormat:'yy-mm-dd',
                altField:'#' + $(this).attr('altField')
            });
            $('.close').click(function () {
                $('#' + $(this).attr("data-dismiss")).hide()
            });

            $('.has_helper_select').each(function (index) {
                tr = $('#' + $(this).attr('id') + '_tr')
                help_block = $('#' + $(this).attr('id') + '_help_block')
            });

            var currentToggleElement = null;

            $('.editor').hide();

            // kattintásra feltölt egy értékkel egy Elementet
            $('.fillOnClick').click(function (event) {
                if (event) {
                    event.preventDefault();
                }
                var entity = $('#' + $(this).attr("fillingEntityId"));
                var val = $(this).attr('fillingValue');
                entity.val(val)
            });

            $('.editorToggle, .fillOnClick').hover(function () {
                $(this).css('cursor', 'pointer');
            }, function () {
                $(this).css('cursor', 'auto');
            });

            $('.editorToggle').click(function (event) {
                toggleWindow(this, event);
            });

            function toggleWindow(self, event) {
                if (event) {
                    event.preventDefault();
                }
                var id = '#'+$(self).attr('entity_id');
                if (currentToggleElement != null) {
                    $(currentToggleElement).toggle(500)
                }
                if (currentToggleElement != id) { // ha másikat nyitott meg
                    $(id).toggle(500)
                    currentToggleElement = id;
                } else {
                    currentToggleElement = null;
                }
            }
        });

        function addSelectValueToInputField(input, select) {
            if (!select.val()) {
                return;
            }
            var tags = input.val();
            if (tags && tags.length != 0) {
                tags += ', ';
            }
            tags += select.val();
            input.val(tags)
        }
    </script>
</head>
<body>
<div class="page-header">
    <div style="display:table;">
        <img src="{{ STATIC_URL }}img/logo.png" style="margin-right: 1em; display: table-cell;"/>

        <h3 style="color:#fff; letter-spacing: 0.1em; display:table-cell; vertical-align:middle;">{{ quote_of_the_visit }}</h3>
        <br/>
    </div>
</div>
<div class="row well-small">
    <div class="span12 tabbable">
        <ul class="nav nav-tabs">
            <li class="{{ tabs.dashboard }}"><a href="/dashboard/" data-toggle="tab">Dashboard</a></li>
            <li class="{{ tabs.goals }}"><a href="/goals/" data-toggle="tab">Goals</a></li>
            <li class="{{ tabs.tasks }}"><a href="/tasks/" data-toggle="tab">Tasks</a></li>
            <li class="{{ tabs.calendar }}"><a href="/calendar/" data-toggle="tab">Calendar</a></li>
            <li class="{{ tabs.habits }}"><a href="/habits/" data-toggle="tab">Habits</a></li>
            <li class="{{ tabs.journal }}"><a href="/journals/" data-toggle="tab">Journal</a></li>
            <li class="{{ tabs.reports }}"><a href="/reports/" data-toggle="tab">Reports</a></li>
        </ul>
        <div class="row" style="background-color:#ebe8ff">
            <div class="span12">
                {% block header %}

                {% endblock %}
            </div>
        </div>
        {% block content %}
            404
        {% endblock %}
    </div>
    <div class="container">
        <div class="span12">
            <table width="100%" cellSpacing="0" cellPadding="0">
                <tr>
                    <td>&copy 2012 Sharp | This site is powered
                        by <a href="https://docs.djangoproject.com/">Django</a></td>
                    <td colspan="100">Processing time: {{ process_time }}</td>
                    <td>Version: {{ version }}</td>
                </tr>
            </table>
        </div>
    </div>
</div>
</body>
</html>